const mongoose = require('mongoose')

const AccountSchema = new mongoose.Schema({
    title: {
        type: String,
        require: true
    },
    time: Date,
    type: {
        type: Number,
        default: -1
    },
    account: {
        type: Number,
        require: true
    },
    remarks: {
        type: String,
    },
})

// 创建模型对象 对文档操作的封装对象
const AccountModel = mongoose.model('accounts', AccountSchema)

module.exports = AccountModel
